<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>后台管理</title>
  <link rel="stylesheet" type="text/css" href="../static/css/iview.css">
  <script type="text/javascript" src="../static/js/vue.mini.js"></script>
  <script type="text/javascript" src="../static/js/iview.mini.js"></script>
    <script type="text/javascript" src="../static/js/jquery.mini.js"></script>
    <!--异步请求两个必须的文件-->
  <script type="text/javascript" src="../static/js/axios.mini.js"></script>
  <script type="text/javascript" src="../static/js/qs.mini.js"></script>
    <script text=" text/javascript" src="../static/js/common.js"></script>
    <script type="text/javascript" src="../static/js/node_modules/bluebird/js/browser/bluebird.js"></script>
    <script type="text/javascript" src="../static/js/node_modules/babel-polyfill/dist/polyfill.js"></script>
</head>
<body>
<div id="app">
  <div style="font-size: 20px; margin-bottom: 20px;margin-top: 20px;margin-left: 8px">
    <i-button @click="add">添加</i-button>
    <i-button @click="update">修改</i-button>
    <i-button @click="del">删除</i-button>
  </div>

  <Modal v-model="visible" title="学院管理"
         @on-ok="saveInfo"
  >
      <i-form ref="formValidate" :model="dept" :rules="ruleValidate" :label-width="80">
        <form-item label="学院名字" prop="name">
            <i-input v-model="dept.dept_name" placeholder="输入学院名字"></i-input>
        </form-item>
          <form-item label="学院编号" prop="num">
              <i-input v-model="dept.num" placeholder="输入学院编号"></i-input>
          </form-item>
          <form-item label="学院年级" prop="grade">
              <i-input v-model="dept.grade" placeholder="输入学院年级"></i-input>
          </form-item>
          <form-item label="班级" prop="class">
              <i-input v-model="dept.class" placeholder="输入学院班级"></i-input>
          </form-item>
      </i-form>
  </Modal>
    <Modal
            v-model="upModel" title="更新学院信息"
            @on-ok="updateInfo">
        <i-form ref="formValidate" :model="dept" :rules="ruleValidate" :label-width="80">
            <form-item label="学院名字" prop="name">
                <i-input v-model="dept.dept_name" placeholder="输入学院名字">{{dept.name}}</i-input>
            </form-item>
            <form-item label="学院编号" prop="num">
                <i-input v-model="dept.dept_num" placeholder="输入学院编号">{{dept.num}}</i-input>
            </form-item>
            <form-item label="学院年级" prop="grade">
                <i-input v-model="dept.dept_grade" placeholder="输入学院年级">{{dept.grade}}</i-input>
            </form-item>
            <form-item label="班级" prop="class">
                <i-input v-model="dept.dept_class" placeholder="输入学院班级">{{dept.class}}</i-input>
            </form-item>
        </i-form>
    </Modal>
  <i-Table id="deptTable" highlight-row ref="currentRowTable" border :columns="columns4" :data="dept_list" @on-select="isSelect" @on-select-cancel="NoSelect" @on-select-all="all_ok" @on-select-all-cancel="all_cancel"></i-Table>
    <div class="close"></div>
</div>
<script type="text/javascript" src="../static/js/dept.js"></script>
</body>
</html>
